package org.Lin.util;

import org.json.JSONObject;
import java.sql.*;

public class LogUtil {

    public static void logOperation(String object, String code, String content) {
        try (Connection conn = DatabaseUtil.getConnection()) {
            String sql = "INSERT INTO OperationLog(operation_object, operation_code, operation_content) VALUES (?, ?, ?)";
            PreparedStatement stmt = conn.prepareStatement(sql);
            stmt.setString(1, object);
            stmt.setString(2, code);
            stmt.setString(3, content);
            stmt.executeUpdate();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
